package test3;

public class Goodstest {
    public static void main(String[] args) {
        Goods[] arr = new Goods[3];
        Goods g1 = new Goods("001","可口可乐",3.0,1000);
        Goods g2 = new Goods("002","保温杯",60,50);
        Goods g3 = new Goods("003","电脑",7999,10);
        arr[0] = g1;
        arr[1] = g2;
        arr[2] = g3;
        for(int i=0;i<3;i++){
            Goods goods =arr[i];
            System.out.println(goods.getId()+","+goods.getName()+","+goods.getPrice()+","+goods.getCount());
        }
    }
}

